from flask import Flask, jsonify, Blueprint
from faker import Faker

app = Flask(__name__)
common_bp = Blueprint('data', __name__, url_prefix='/common')


@common_bp.route('/generate-data')
def generate_data():
    fake = Faker()
    data = {
        "name": fake.name(),
        "email": fake.email(),
        "address": fake.address()
    }
    app.logger.info(data)
    return jsonify(data)
